<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <title>06键盘事件</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>

<body>
    <div id="demo">
        <input @keyup.enter='sailing' type="text"placeholder="输入内容，按下回车提示输入"><br/>
        <input @keyup.delete='sailing' type="text"placeholder="输入内容，按下delete提示删除"><br/>
        <input @keyup.esc='sailing' type="text"placeholder="输入内容，按下esc提示输入"><br/>
        <input @keyup.space='sailing' type="text"placeholder="输入内容，按下空格提示输入"><br/>
        <input @keydown.tab='sailing' type="text"placeholder="输入内容，按下tab提示输入"><br/>
        <input @keydown.up='sailing' type="text"placeholder="输入内容，按下上键提示输入"><br/>
        <input @keydown.down='sailing' type="text"placeholder="输入内容，按下下键提示输入"><br/>

    </div>
    <script type="text/javascript">
        Vue.config.productionTip = false
        new Vue({
            el: '#demo',
            data: {},
            methods: {
                sailing(){
					alert(event.target.value)
				}
            },
            
        })
    </script>
</body>

</html>